Little changes on Colombian Programming Contest solutions.
[and.git] / 483 - Word scramble / 483.cpp
blob05c32a6e0a61f391e20f2df20a5c2951f8774115
1 /*
2 Problem: 483 - Word scramble
3 Author: Andrés Mejía-Posada
4 (http://blogaritmo.factorcomun.org)
6 */
8 using namespace std;
9 #include <algorithm>
10 #include <iostream>
11 #include <iterator>
12 #include <sstream>
13 #include <fstream>
14 #include <cassert>
15 #include <climits>
16 #include <cstdlib>
17 #include <cstring>
18 #include <string>
19 #include <cstdio>
20 #include <vector>
21 #include <cmath>
22 #include <queue>
23 #include <deque>
24 #include <stack>
25 #include <map>
26 #include <set>
28 #define D(x) cout << #x " is " << x << endl
30 int main(){
31 for (string s; getline(cin, s); cout << "\n"){
32 bool first = true;
33 for (stringstream sin(s); sin >> s; reverse(s.begin(), s.end()), cout << (first ? "" : " ") << s, first = false);
35 return 0;